<script setup lang="ts">
import { ref } from 'vue'
import MarkdownEditor from '@/components/MarkdownEditor/index.vue'

const markdown = ref('## Markdown Editor\n🌈示例内容')

const onSave = (markdown: string) => {
  console.log('save content \n\n', markdown)
}
</script>

<template>
  <div class="container">
    <MarkdownEditor v-model="markdown" height="500px" @save="onSave" />
  </div>
</template>

<style scoped>
.container {
  width: 1000px;
  margin: 100px auto;
  border: 1px solid #ccc;
}
</style>
